<?php

namespace frontendx\controllers;

/**
 * @author  shuang
 * @date    2016-11-3 11:50:43
 * @version V1.0
 * @desc    
 */
use common\components\WXController;
use Yii;
use yii\helpers\Json;

class AccountController extends WXController {

    public function actionPayinfo() {
        return $this->render("payinfo");
    }

    public function actionTixian() {
        $this->headerTitle = "提现";
        return $this->render("tixian");
    }

    public function actionTxrecord() {
        $this->headerTitle = "提现记录";
        return $this->render("txrecord");
    }

    public function actionTxrules() {
        $this->headerTitle = "提现规则";
        return $this->render("txrules");
    }

    public function actionAjaxtxrecord() {
        $this->layout = false;
        $page = Yii::$app->request->post("page");
        $limit = 10;
        $offset = ($page-1) * $limit;
        $query = \frontendw\models\WB_UserDrawalRecord::find();
        $query->offset($offset);
        $query->limit($limit);
        $result = $query->asArray()->all();
        return $this->render("ajaxtxrecord", ["data" => $result]);
    }

}
